#include <SFML/Graphics.hpp>
#include <GameTime.hh>
#include <Game.hh>
#include <Player.hh>
#include <Header.hh>
#include <iostream>
#include <GameScreen.hh>
#include <Menu.hh>
#include <Settings.hh>
#include <ConnectMenu.hh>

#include <NetworkManager.hh>

int main()
{
    //Applications variables
    std::vector<GameScreen*> screens;
    int screen = MENU_NETWORK;

    //Window creation
    sf::RenderWindow _Window(sf::VideoMode(800, 600, 32), "Demo");

    //Screens preparations
    Game    _game(_Window);
    screens.push_back(&_game);

    ConnectMenu _connection(_Window);
    screens.push_back(&_connection);

    Menu    _menu(_Window);
    screens.push_back(&_menu);

    Settings    _settings(_Window);
    screens.push_back(&_settings);

    //Main loop
    while (screen >= 0)
    {
        screen = screens[screen]->Run();
    }

    return EXIT_SUCCESS;
}
